#include "Circle.h"
#include <iostream>

using namespace std;

int Circle::numberOfCircle = 0;

Circle::Circle(): radius(1)
{
  cout << "Circle no-arg constructor is called. Radius is set to 1." << endl;
  numberOfCircle++;
}

Circle::Circle(double radius)
{
  setRadius(radius);
  numberOfCircle++;
}

double Circle::getRadius()
{
  return this->radius;
}

void Circle::setRadius(double radius)
{
  this->radius = ( (radius >= 0) ? radius : 0 );
}

double Circle::getArea()
{
  return PI * radius * radius;
}

int Circle::getCircleNumber()
{
  return Circle::numberOfCircle;
}
